<!DOCTYPE html><html><head><meta content='' name='description'>
        <meta charset='UTF-8'>
        <meta content='True' name='HandheldFriendly'>
        <meta content='width=device-width, initial-scale=1.0' name='viewport'>
        <title><?php echo $title ?> - 管理后台 - <?php echo $settings['site_name'] ?></title>
        <?php $this->load->view('common/header-meta'); ?>

    </head>
    <body id="startbbs">
        <?php $this->load->view('common/header'); ?>
        <div class="container">
            <div class="row">
                <?php $this->load->view('common/sidebar'); ?>
                <div class="col-md-10">
                    <ol class="breadcrumb">
                        <li><a href="<?php echo site_url('admin/index') ?>">管理首页</a></li>
                        <li><a href="<?php echo site_url('admin/info_art') ?>">信息列表</a></li>
                        <li class="active">编辑信息</li>
                    </ol>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">编辑信息</h3>
                        </div>
                        <div class="panel-body">
                            <form accept-charset="UTF-8" action="<?php echo site_url('admin/info_art/edit/' . $info['id']); ?>" class="form-horizontal" id="edit_user_1" method="post" novalidate="novalidate">
                                <input type="hidden" name="<?php echo $csrf_name; ?>" value="<?php echo $csrf_token; ?>">
                                <div class="form-group">
                                    <label class="col-md-3 control-label" for="title">信息标题</label>
                                    <div class="col-md-5">
                                        <input class="form-control" id="title" name="title" size="50" type="text" value="<?php echo $info['title'] ?>" />
                                    </div>
                                </div>
                                <div class="form-group email optional">
                                    <label class="col-md-3 control-label" for="cate_list">信息分类</label>
                                    <div class="col-md-5">
                                        <select name="cateid" class="form-control" >
                                            <option value="0">请选择分类</option>
                                            <?php foreach ($cates as $key => $value) { ?>
                                                <option <?php if ($info['cateid'] == $value['id']) { ?> selected="selected" <?php } ?> value="<?php echo $value['id']; ?>"> <?php echo $value['cate_name']; ?></option>

                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group email optional">
                                    <label class="col-md-3 control-label" for="author">上传者</label>
                                    <div class="col-md-5">
                                        <input class="form-control" id="author" name="author" size="50" type="text" value="<?php echo $info['author'] ?>" />
                                    </div>
                                </div>

                                <div class="form-group string optional">
                                    <label class="col-md-3 control-label" for="viewtimes">浏览次数</label>
                                    <div class="col-md-5">
                                        <input class="form-control" id="viewtimes" name="viewtimes" type="text" value="<?php echo $info['viewtimes'] ?>" />
                                    </div>
                                </div>
                                <div class="form-group string optional">
                                    <label class="col-md-3 control-label" for="keywords">关键字</label>
                                    <div class="col-md-5">
                                        <input class="form-control" id="keywords" name="keywords" size="50" type="text" value="<?php echo $info['keywords'] ?>" />
                                    </div>
                                </div>
                                <div class="form-group string optional">
                                    <label class="col-md-3 control-label" for="ishome">是否置顶</label>
                                    <div class="col-md-5">
                                        <label class="radio-inline">
                                            <input type="radio" name="ishome" <?php if ($info['ishome'] == 0) { ?> checked="checked" <?php } ?> id="ishome0" value="0"> 不置顶
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="ishome" <?php if ($info['ishome'] == 1) { ?> checked="checked" <?php } ?> id="ishome1" value="1"> 置顶
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group string optional">
                                    <label class="col-md-3 control-label" for="status">是否发布</label>
                                    <div class="col-md-5">
                                        <label class="radio-inline">
                                            <input type="radio" name="status" <?php if ($info['status'] == 0) { ?> checked="checked" <?php } ?> id="status0" value="0"> 未发布
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="status" <?php if ($info['status'] == 1) { ?> checked="checked" <?php } ?> id="status1" value="1"> 已发布
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group string optional">
                                    <label class="col-md-3 control-label" for="status">信息内容</label>
                                    <div class="col-md-9">
                                        <textarea name="content" id="content" style="width:100%;height:400px;visibility:hidden;"><?php echo $info['content']; ?></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-offset-3 col-md-9">
                                        <button type="submit" name="commit" class="btn btn-primary">保存信息</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div><!-- /.col-md-8 -->

            </div><!-- /.row -->
        </div><!-- /.container -->
        <script type="text/javascript" src="<?php echo base_url('static/kindeditor/kindeditor-all-min.js'); ?>"></script>
        <script>
            jQuery(function ($) {
                var editor = KindEditor.create('textarea[name="content"]', {
                    uploadJson: "<?php echo base_url('static/'); ?>/kindeditor/php/upload_json.php",
                    fileManagerJson: "<?php echo base_url('static/'); ?>/kindeditor/php/file_manager_json.php",
                    allowFileManager: true,
                    urlType: "absolute", //采用域名显示上传的图片
                    afterBlur: function () {
                        this.sync();
                    }
                });
            });
        </script>
        <?php $this->load->view('common/footer'); ?>
    </body></html>
